﻿using System.Collections.Generic;
using System.ServiceModel;

namespace InternetBankService
{
    using System.Net.Security;

    using HelpersAndContracts.Contracts;

    [ServiceContract]
    public interface IPaymentsService
    {
        [OperationContract]
        byte[] GetServerPublicKey(string username);

        [OperationContract]
        void GenerateServerSecretKey(byte[] clientPublicKey, byte[] cleintInitializationVector);

        [OperationContract]
        bool Authenticate(EncodedCredentialsModel credentials);

        [OperationContract]
        bool CheckTransactionPassword(EncodedCredentialsModel credentials);

        [OperationContract]
        EncodedBalanceModel GetBalance(string username);

        [OperationContract]
        bool ApplyPayment(EncodedPaymentModel payment);

        [OperationContract]
        bool CheckMCodeAndSubmitPayment(EncodedCredentialsModel credentials);

        [OperationContract]
        IEnumerable<EncodedPaymentModel> GetUserPayments(string username);
        
        [OperationContract]
        EncodedClientModel AddUser(EncodedClientModel client);

        [OperationContract]
        byte[] GetinitializationVector();
    }
}
